﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Threading;
using M7;

namespace C7
{
	/// <summary>
	/// Interaction logic for BaseWindow.xaml
	/// </summary>
    public partial class FeedbackWindow : UserControl
    {
        private WindowOperations WindowOPs = new WindowOperations();
        public FeedbackWindow()
        {
            this.InitializeComponent();
            WindowOPs.TextBoxesToHandlers(LayoutRoot);
            WindowOPs.WindowToAnimationHandlers(LayoutRoot, true);
        }

        private void spOKMouseLeftButtonUp(object sender, MouseButtonEventArgs e)
        {
            NFeedback newFeed = new NFeedback();

            newFeed.FoodSize = int.Parse(tbFoodSize.Text);
            newFeed.FoodFlavor = int.Parse(tbFoodFlavour.Text);
            newFeed.FoodPresentation = int.Parse(tbFoodPresentation.Text);
            newFeed.FoodPrice = int.Parse(tbFoodPrice.Text);
            newFeed.FoodFreshness = int.Parse(tbFoodFreshness.Text);
            newFeed.ServiceFriendlyness = int.Parse(tbServiceFriendlyness.Text);
            newFeed.ServiceExplaination = int.Parse(tbExplainationOfService.Text);
            newFeed.ServiceTimeTaken = int.Parse(tbTimeTakenToService.Text);
            newFeed.VanueAtmosphere = int.Parse(tbVanueAtmosphere.Text);
            newFeed.VanueCleanliness = int.Parse(tbVanueCleanliness.Text);
            newFeed.VanueStaffPresentation = int.Parse(tbStaffPresentation.Text);
            newFeed.Comment = tbComment.Text;

            Feedback.Add(ref newFeed);

            //Close el animation hna
        }
    }
}